﻿<%@ Page Title="" Language="C#" MasterPageFile="~/DCTEDU_/HeThongMaster.master" AutoEventWireup="true"
    CodeBehind="DMPhanMem.aspx.cs" Inherits="QuanLyThietBi.DCTEDU_.DanhMuc.DMPhanMem" %>

<%@ Register Assembly="PagerControl" Namespace="CutePager" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>Danh mục Phần mềm</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:UpdatePanel ID="upPanel1" runat="server">
        <ContentTemplate> 
            <asp:HiddenField ID="H_CatalogId" Value="0" runat="server" />
            <div class="row">
                <div class="col-md-12">
                    <section class="panel">
            <header class="panel-heading">
                Danh mục Phần mềm
            </header>
           
            <div class="panel-body">
                <div class="row"> 
                    <div class="col-xs-6 form-group">
                        <label class="col-sm-6 control-label">Tên phần mềm<span style="color: Red">(*)</span></label>
                        <div class="col-sm-6">
                        <asp:TextBox ID="txtTen" runat="server" CssClass="form-control canh-float-left error" MaxLength="100"  ></asp:TextBox>
                         <asp:RequiredFieldValidator ID="RequiredFieldValidator1" SetFocusOnError="true"
                                    runat="server" ErrorMessage="*" ControlToValidate="txtTen">
                                                <label class="control-label" for="inputError"><i class="fa fa-times-circle-o"></i> Chưa nhập</label>
                                            </asp:RequiredFieldValidator>
                        </div>
                    </div>
                     <div class="col-xs-6 form-group">
                        <label class="col-sm-6 control-label">Dung lượng</label>
                        <div class="col-sm-6">
                      <asp:TextBox ID="txtDungLuong" CssClass="form-control canh-float-left" MaxLength="100"
                                    runat="server"></asp:TextBox>   
                        </div>
                    </div> 
                    </div>   
<div class="row">  
                    <div class="col-xs-6 form-group">
                        <label class="col-sm-6 control-label">Đường dẫn</label>
                        <div class="col-sm-6">
                      <asp:TextBox ID="txtDuongDan" CssClass="form-control canh-float-left" MaxLength="100"
                                    runat="server"></asp:TextBox>
                        </div>
                    </div>  
                    <div class="col-xs-6 form-group">
                        <label class="col-sm-6 control-label">GhiChu</label>
                        <div class="col-sm-6">
                      <asp:TextBox ID="txtGhiChu" CssClass="form-control canh-float-left" TextMode="MultiLine" Rows="3" MaxLength="200"
                                    runat="server"></asp:TextBox>
                        </div>
                    </div>     
                    <div class="col-xs-6 form-group">
                    <div class="col-lg-6">
                    <asp:Button ID="cmdSave" runat="server" Text="Lưu" OnClick="cmdSave_Click" CssClass="btn btn-primary" />
                     </div>
                   </div>   
    </div> 
                </div>
            </div>
   
                </div>
            <div class="row">
                <div class="col-md-12">
                    <section class="panel">
            <header class="panel-heading">
                Danh sách
            </header>
            <div class="panel-body">
            <section>
            <asp:GridView ID="gridCatalog" runat="server" DataKeyNames="MaPhanMem" Width="100%" CssClass="table table-bordered table-striped table-condensed" BackColor="White"
                                        OnRowCommand="gridCatalog_RowCommand" OnRowDataBound="gridCatalog_RowDataBound"
                                        OnRowDeleting="gridCatalog_RowDeleting" EmptyDataText="<br><center>Không tồn tại dữ liệu</center><br>"
                                        BorderColor="#CCCCCC" AutoGenerateColumns="false" BorderStyle="Solid" BorderWidth="1px"
                                        CellPadding="3">
                                        <Columns>
                                            <asp:BoundField DataField="MaPhanMem" Visible="false" HeaderText="id"></asp:BoundField>
                                            <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"
                                                ItemStyle-Width="7%" HeaderText="Sửa">
                                                <ItemTemplate>
                                                    <asp:ImageButton ID="cmdSelects" runat="server" CssClass="command_button" CausesValidation="false"
                                                        CommandName="Select" ToolTip="Click để sửa" ImageUrl="~/Images/edit.png" CommandArgument='<%# Eval("MaPhanMem") %>' />
                                                </ItemTemplate>
                                                <ItemStyle HorizontalAlign="Center" Width="7%" />
                                            </asp:TemplateField>
                                            <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"
                                                ItemStyle-Width="7%" HeaderText="Xóa">
                                                <ItemTemplate>
                                                    <asp:ImageButton ID="cmdDelete" runat="server" CssClass="command_button" CausesValidation="false"
                                                        CommandName="Delete" ToolTip="Click để xóa" ImageUrl="~/Images/DeleteRed.png"
                                                        CommandArgument='<%# Eval("MaPhanMem") %>' />
                                                </ItemTemplate>
                                                <ItemStyle HorizontalAlign="Center" Width="7%" />
                                            </asp:TemplateField>
                                            <asp:BoundField DataField="TenPhanMem" ItemStyle-Width="20%" HeaderText="Tên phần mềm">
                                            </asp:BoundField>
                                            <asp:BoundField DataField="DungLuong" ItemStyle-Width="10%" HeaderText="Dung lượng"></asp:BoundField>
                                            <asp:BoundField DataField="DuongDan" ItemStyle-Width="40%" HeaderText="Đường dẫn">
                                            </asp:BoundField>
                                        </Columns>
                                        <RowStyle ForeColor="#000066" />
                                        <SelectedRowStyle BackColor="#dedfdf" Font-Bold="True" ForeColor="Gray" />
                                       
                                    </asp:GridView>
                                     <cc1:Pager ID="Pager1" CssClass="pagination pagination-lg" runat="server" PreviousClause="«" NextClause="»" LastClause=""
                                    FirstClause="" PageClause="Trang" OfClause="/" PageSize="10" OnCommand="Pager1_Command">
                                </cc1:Pager>
            </section>
            </div>
            </section>
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel> 
     <asp:UpdateProgress runat="server" ID="UpdateProgress2" AssociatedUpdatePanelID="upPanel1">
        <ProgressTemplate>
            <div style="top: 20%; right: 50%; transition: all 300ms ease 100ms;
                color: Black; padding: 8px; position: fixed; z-index: 10000">
                <asp:Image runat="server" ID="imgloading" ImageUrl="~/Images/loading.gif"/></div>
        </ProgressTemplate>
    </asp:UpdateProgress>
</asp:Content>
